<%--
  Created by IntelliJ IDEA.
  User: ZTencent
  Date: 2022/12/29
  Time: 10:16
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE HTML>
<html>
<head>
    <meta charset="utf-8">
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <!--[if lt IE 9]>
    <script type="text/javascript" src="${pageContext.request.contextPath}/statics/js/html5.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/statics/js/respond.min.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/statics/js/PIE_IE678.js"></script>
    <![endif]-->
    <link href="${pageContext.request.contextPath}/statics/assets/css/bootstrap.min.css" rel="stylesheet" />
    <link rel="stylesheet" href="${pageContext.request.contextPath}/statics/css/style.css"/>
    <link href="${pageContext.request.contextPath}/statics/assets/css/codemirror.css" rel="stylesheet">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/statics/assets/css/ace.min.css" />
    <link rel="stylesheet" href="${pageContext.request.contextPath}/statics/Widget/zTree/css/zTreeStyle/zTreeStyle.css" type="text/css">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/statics/assets/css/font-awesome.min.css" />
    <!--[if IE 7]>
    <link rel="stylesheet" href="${pageContext.request.contextPath}/statics/assets/css/font-awesome-ie7.min.css" />
    <![endif]-->
    <link href="${pageContext.request.contextPath}/statics/Widget/icheck/icheck.css" rel="stylesheet" type="text/css" />
    <link href="${pageContext.request.contextPath}/statics/Widget/webuploader/0.1.5/webuploader.css" rel="stylesheet" type="text/css" />
    <style>
        #container{
            width: 100%;
            height: 500px;
        }
    </style>
    <title>新增图片</title>
</head>
<body>
<div class="clearfix " id="add_picture">
    <div class="page_center_style container">
        <div class="type_title text-center"><h1>添加优惠卷</h1></div>
        <form action="${pageContext.request.contextPath}/business/coupon/add" method="post" class="form form-horizontal" id="form-article-add">
            <div class="clearfix cl">
                <label class="form-label col-2"><span class="c-red">*</span>优惠卷名称：</label>
                <div class="formControls col-10"><input type="text" class="input-text" value="" placeholder="" id="" name="couponName"></div>
            </div>
            <div class=" clearfix cl">
                <div class="Add_p_s">
                    <label class="form-label col-2">是否满减：</label>
                    <div class="formControls col-2">
                        <input type="checkbox" onchange="changespecia()"  name="isFullDecrement" value="1">
                    </div>
                </div>
                <div class="Add_p_s">
                    <label class="form-label col-2">满减金额：</label>
                    <div class="formControls col-2">
                        <input type="text"  class="input-text" name="fullPrice" value="1" disabled>
                    </div>
                </div>
                <div class="Add_p_s">
                    <label class="form-label col-2">减免金额：</label>
                    <div class="formControls col-2">
                        <input type="text"  class="input-text" name="reductionPrice" value="1" disabled>
                    </div>
                </div>
            </div>
            <div class=" clearfix cl">
                <div class="Add_p_s">
                    <label class="form-label col-2">是否折扣：</label>
                    <div class="formControls col-2">
                        <input type="checkbox" onchange="changespecia1()"  name="isdiscount" value="1">
                    </div>
                </div>
                <div class="Add_p_s">
                    <label class="form-label col-2">折扣：</label>
                    <div class="formControls col-2">
                        <input type="text"  class="input-text" name="discount" value="1" disabled>
                    </div>
                </div>
            </div>
            <div class="clearfix cl">
                <div class="Button_operation">
                    <button class="btn btn-primary radius" type="submit"><i class="icon-save "></i>提交</button>
                </div>
            </div>
        </form>
    </div>
</div>
</div>
<script src="${pageContext.request.contextPath}/statics/js/jquery-1.9.1.min.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/statics/Widget/ueditor/ueditor.config.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/statics/Widget/ueditor/ueditor.all.js"> </script>
<script type="text/javascript" src="${pageContext.request.contextPath}/statics/Widget/ueditor/lang/zh-cn/zh-cn.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/statics/assets/layer/layer.js"></script>
<script>


    function changespecia() {
        if($("input[name='isFullDecrement']").prop("checked")){
            $("input[name='fullPrice']").removeAttr("disabled");
            $("input[name='reductionPrice']").removeAttr("disabled");


        }else {
            $("input[name='fullPrice']").attr("disabled","disabled");
            $("input[name='reductionPrice']").attr("disabled","disabled");

        }
    }
    function changespecia1() {
        if($("input[name='isdiscount']").prop("checked")){
            $("input[name='discount']").removeAttr("disabled");

        }else {
            $("input[name='discount']").attr("disabled","disabled");
        }
    }
</script>
</body>
</html>
